package view;

import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

public class ProViewPanel extends JPanel {

	private static final long serialVersionUID = 1L;
	private JLabel lblPuschansePrice_ViewPro;
	private JLabel lblVND;
	private JLabel lblID_ViewPro;
	private JLabel lblVND1;
	private JLabel lblQuantity_ViewPro;
	private JLabel lblSalePrice_ViewPro;
	private JLabel lblName_ViewPro;
	private JLabel lblSupplier_ViewPro;
	private JTextField tfQuantity_ViewPro;
	private JTextField tfID_ViewPro;
	private JTextField tfName_ViewPro;
	private JTextField tfSupplier_ViewPro;
	private JTextField tfPuschansePrice_ViewPro;
	private JTextField tfSalePrice_ViewPro;
	private JButton btnLoad_ViewPro;
	private JButton btnDetail_ViewPro;
	private JButton btnEdit_ViewPro;
	private JButton btnRemove_ViewPro;
	private JButton btnSearch_ViewPro;
	private JButton btnUpdate_ViewPro;
	private JComboBox<String> cbbSearch_ViewPro;
	private JLabel lblSearchBy_ViewPro;
	private JLabel jLabel2;
	private JPanel jPanel1;
	private JPanel panelInfor_ViewPro;
	private JPanel panelSearch_ViewPro;
	private JPanel panelList_ViewPro;
	private JPanel panelLoadImage_ViewPro;
	private JScrollPane jScrollPane1;
	private JTable table_ViewPro;
	private JTextField tfSearch_ViewPro;

	public ProViewPanel() {
		initComponents();
	}

	@SuppressWarnings({ "unchecked", "rawtypes" })
	private void initComponents() {

		jPanel1 = new JPanel();
		jLabel2 = new JLabel();
		panelInfor_ViewPro = new JPanel();
		lblSupplier_ViewPro = new JLabel();
		lblName_ViewPro = new JLabel();
		lblQuantity_ViewPro = new JLabel();
		lblVND = new JLabel();
		lblPuschansePrice_ViewPro = new JLabel();
		tfQuantity_ViewPro = new JTextField();
		tfID_ViewPro = new JTextField();
		tfName_ViewPro = new JTextField();
		tfSupplier_ViewPro = new JTextField();
		tfPuschansePrice_ViewPro = new JTextField();
		panelLoadImage_ViewPro = new JPanel();
		btnLoad_ViewPro = new JButton();
		btnDetail_ViewPro = new JButton();
		lblSalePrice_ViewPro = new JLabel();
		tfSalePrice_ViewPro = new JTextField();
		lblID_ViewPro = new JLabel();
		lblVND1 = new JLabel();
		panelSearch_ViewPro = new JPanel();
		tfSearch_ViewPro = new JTextField();
		btnSearch_ViewPro = new JButton();
		lblSearchBy_ViewPro = new JLabel();
		cbbSearch_ViewPro = new JComboBox();
		btnEdit_ViewPro = new JButton();
		btnRemove_ViewPro = new JButton();
		panelList_ViewPro = new JPanel();
		jScrollPane1 = new JScrollPane();
		table_ViewPro = new JTable();
		btnUpdate_ViewPro = new JButton();

		GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
		jPanel1.setLayout(jPanel1Layout);
		jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGap(0, 100, Short.MAX_VALUE));
		jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGap(0, 100, Short.MAX_VALUE));

		jLabel2.setText("jLabel2");

		setBackground(new java.awt.Color(255, 255, 255));
		setLayout(null);

		panelInfor_ViewPro.setBackground(new java.awt.Color(255, 255, 255));
		panelInfor_ViewPro.setBorder(BorderFactory.createTitledBorder(null, "Information",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelInfor_ViewPro.setLayout(null);

		lblSupplier_ViewPro.setFont(new java.awt.Font("Calibri", 0, 16));
		lblSupplier_ViewPro.setText("Supplier:");
		panelInfor_ViewPro.add(lblSupplier_ViewPro);
		lblSupplier_ViewPro.setBounds(300, 90, 70, 20);

		lblName_ViewPro.setFont(new java.awt.Font("Calibri", 0, 16));
		lblName_ViewPro.setText("Product Name:");
		panelInfor_ViewPro.add(lblName_ViewPro);
		lblName_ViewPro.setBounds(300, 60, 95, 20);

		lblQuantity_ViewPro.setFont(new java.awt.Font("Calibri", 0, 16));
		lblQuantity_ViewPro.setText("Quantity:");
		panelInfor_ViewPro.add(lblQuantity_ViewPro);
		lblQuantity_ViewPro.setBounds(300, 180, 90, 20);

		lblVND.setFont(new java.awt.Font("Calibri", 0, 16));
		lblVND.setText("VND");
		panelInfor_ViewPro.add(lblVND);
		lblVND.setBounds(590, 150, 30, 20);

		lblPuschansePrice_ViewPro.setFont(new java.awt.Font("Calibri", 0, 16));
		lblPuschansePrice_ViewPro.setText("Puschase Price:");
		panelInfor_ViewPro.add(lblPuschansePrice_ViewPro);
		lblPuschansePrice_ViewPro.setBounds(300, 120, 110, 20);
		panelInfor_ViewPro.add(tfQuantity_ViewPro);
		tfQuantity_ViewPro.setBounds(430, 180, 190, 20);
		panelInfor_ViewPro.add(tfID_ViewPro);
		tfID_ViewPro.setBounds(430, 30, 190, 20);
		panelInfor_ViewPro.add(tfName_ViewPro);
		tfName_ViewPro.setBounds(430, 60, 190, 20);
		panelInfor_ViewPro.add(tfSupplier_ViewPro);
		tfSupplier_ViewPro.setBounds(430, 90, 190, 20);
		panelInfor_ViewPro.add(tfPuschansePrice_ViewPro);
		tfPuschansePrice_ViewPro.setBounds(430, 120, 150, 20);

		GroupLayout jPanel5Layout = new GroupLayout(panelLoadImage_ViewPro);
		panelLoadImage_ViewPro.setLayout(jPanel5Layout);
		jPanel5Layout.setHorizontalGroup(jPanel5Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGap(0, 190, Short.MAX_VALUE));
		jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGap(0, 160, Short.MAX_VALUE));

		panelInfor_ViewPro.add(panelLoadImage_ViewPro);
		panelLoadImage_ViewPro.setBounds(50, 20, 190, 160);

		btnLoad_ViewPro.setText("Load");
		panelInfor_ViewPro.add(btnLoad_ViewPro);
		btnLoad_ViewPro.setBounds(80, 190, 55, 23);

		btnDetail_ViewPro.setText("Detail");
		panelInfor_ViewPro.add(btnDetail_ViewPro);
		btnDetail_ViewPro.setBounds(150, 190, 59, 23);

		lblSalePrice_ViewPro.setFont(new java.awt.Font("Calibri", 0, 16));
		lblSalePrice_ViewPro.setText("Sale Price:");
		panelInfor_ViewPro.add(lblSalePrice_ViewPro);
		lblSalePrice_ViewPro.setBounds(300, 150, 90, 20);
		panelInfor_ViewPro.add(tfSalePrice_ViewPro);
		tfSalePrice_ViewPro.setBounds(430, 150, 150, 20);

		lblID_ViewPro.setFont(new java.awt.Font("Calibri", 0, 16));
		lblID_ViewPro.setText("ID:");
		panelInfor_ViewPro.add(lblID_ViewPro);
		lblID_ViewPro.setBounds(300, 30, 50, 20);

		lblVND1.setFont(new java.awt.Font("Calibri", 0, 16));
		lblVND1.setText("VND");
		panelInfor_ViewPro.add(lblVND1);
		lblVND1.setBounds(590, 120, 30, 20);

		add(panelInfor_ViewPro);
		panelInfor_ViewPro.setBounds(10, 0, 680, 230);

		panelSearch_ViewPro.setBackground(new java.awt.Color(255, 255, 255));
		panelSearch_ViewPro.setBorder(BorderFactory.createTitledBorder(null, "Search",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelSearch_ViewPro.setLayout(null);
		panelSearch_ViewPro.add(tfSearch_ViewPro);
		tfSearch_ViewPro.setBounds(10, 30, 130, 20);

		btnSearch_ViewPro.setIcon(new ImageIcon("icon/search.png"));
		btnSearch_ViewPro.setText("Search");
		btnSearch_ViewPro.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton5ActionPerformed(evt);
			}
		});
		panelSearch_ViewPro.add(btnSearch_ViewPro);
		btnSearch_ViewPro.setBounds(240, 30, 90, 20);

		lblSearchBy_ViewPro.setText("By");
		panelSearch_ViewPro.add(lblSearchBy_ViewPro);
		lblSearchBy_ViewPro.setBounds(150, 30, 20, 20);

		cbbSearch_ViewPro.setModel(new DefaultComboBoxModel(new String[] { "Item 1",
				"Item 2", "Item 3", "Item 4" }));
		panelSearch_ViewPro.add(cbbSearch_ViewPro);
		cbbSearch_ViewPro.setBounds(170, 30, 56, 20);

		add(panelSearch_ViewPro);
		panelSearch_ViewPro.setBounds(10, 240, 340, 70);

		btnEdit_ViewPro.setBackground(new java.awt.Color(255, 255, 255));
		btnEdit_ViewPro.setIcon(new ImageIcon("icon/em_edit.png"));
		btnEdit_ViewPro.setText("Edit");
		add(btnEdit_ViewPro);
		btnEdit_ViewPro.setBounds(380, 250, 90, 30);

		btnRemove_ViewPro.setIcon(new ImageIcon("icon/em_delete.png"));
		btnRemove_ViewPro.setText("Remove");
		add(btnRemove_ViewPro);
		btnRemove_ViewPro.setBounds(580, 250, 100, 30);

		panelList_ViewPro.setBackground(new java.awt.Color(255, 255, 255));
		panelList_ViewPro.setBorder(BorderFactory.createTitledBorder(null,
				"List Customer", TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));

		table_ViewPro.setModel(new DefaultTableModel(new Object[][] {
				{ null, null, null, null, null, null },
				{ null, null, null, null, null, null },
				{ null, null, null, null, null, null },
				{ null, null, null, null, null, null },
				{ null, null, null, null, null, null } }, new String[] { "ID",
				"Product Name", "Supplier", "Puschase Price", "Sale Price",
				"Quantity" }));
		jScrollPane1.setViewportView(table_ViewPro);

		GroupLayout jPanel4Layout = new GroupLayout(panelList_ViewPro);
		panelList_ViewPro.setLayout(jPanel4Layout);
		jPanel4Layout.setHorizontalGroup(jPanel4Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addComponent(jScrollPane1,
				GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE));
		jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGroup(
				jPanel4Layout
						.createSequentialGroup()
						.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE,
								115, GroupLayout.PREFERRED_SIZE)
						.addGap(0, 0, Short.MAX_VALUE)));

		add(panelList_ViewPro);
		panelList_ViewPro.setBounds(10, 310, 680, 140);

		btnUpdate_ViewPro.setBackground(new java.awt.Color(255, 255, 255));
		btnUpdate_ViewPro.setIcon(new ImageIcon("icon/save.png"));
		btnUpdate_ViewPro.setText("Update");
		btnUpdate_ViewPro.setEnabled(false);
		add(btnUpdate_ViewPro);
		btnUpdate_ViewPro.setBounds(480, 250, 90, 30);

	}

	private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

	}

}
